package com.test.design.example3.builder.impl;

import com.test.design.example3.builder.HouseBuilder;
import com.test.design.example3.dto.House;

/**
 * @program: design-patternz
 * @description: 实现具体的建造者
 * @author: <a href="mailto:zhengjiaming@gtmap.cn">zhengjiaming</a>
 * @create: 2024-12-26 14:23
 **/
public class ConcreteHouseBuilder implements HouseBuilder {
    private House house;

    public ConcreteHouseBuilder() {
        this.house = new House();
    }

    @Override
    public void buildWalls() {
        house.setWalls("建造墙壁");
    }

    @Override
    public void buildRoof() {
        house.setRoof("建造屋顶");
    }

    @Override
    public void buildFloor() {
        house.setFloor("建造地板");
    }

    @Override
    public House getHouse() {
        return house;
    }
}
